class CreateTools < ActiveRecord::Migration
  def self.up
    create_table :tools do |t|
      t.column  :name,            :string
      t.column  :company,         :string
      t.column  :type,            :string
      t.column  :created_on,      :timestamp
      t.column  :updated_on,      :timestamp
      t.column  :lock_version,    :integer, :default => 0
    end
    
    create_table :customers_tools do |t|
      t.column  :customer_id,     :integer
      t.column  :tool_id,         :integer
    end
  end

  def self.down
    drop_table :customers_tools
    drop_table :tools
  end
end
